package cn.edu.cqut.test0409;

public class InnerClassTest {
	public static void main(String[] args) {
		Outer outer = new Outer();
		System.out.println(outer.new Inner1().a2);
		System.out.println(new Outer.Inner2().a3);
		outer.show();
	}
}

class Outer
{
	int a1;
	class Inner1
	{
		int a2 = 10;
		void show()
		{
			System.out.println(a1);
		}
	}
	static class Inner2
	{
		int a3 = 20;
		void show()
		{
//			System.out.println(a1);
		}
	}
	
	void show()
	{
		int c = 200;
		class Inner3
		{
			void sayHello()
			{
				System.out.println(200);
			}
		}
		Inner3 innner3 = new Inner3();
		innner3.sayHello();
		new Inner1().a2 = 30;
		
		new Inner2().a3 = 50;
	}
	
	static void display()
	{
		//new Inner1().a2 = 30;
		
		new Inner2().a3 = 50;
	}
}
